<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Welcome!</title>
<!-- 引入bootstrap -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
<script src="bootstrap-3.3.7-dist/js/jquery.min.js"></script>
<script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="style/css/login.css" />

<style type="text/css">
#indexbox {
	width: 100%;
}

#indextop {
	background-color: #FFFFFF;
	padding-left: 20px;
	height: 70px;
}

#indexbottom {
	background-color: #FFFFFF;
	height: 50px;
}

#indexmiddle {
	background-color: #84C1FF;
	height: 400px;
}

#chose {
	margin: 100px 500px;
}
</style>

<script>
$(function() {
	$('#buildcompanyModal').modal('hide');
});
</script>

<script>
$(function(){
	$('#submitcompany').click(function(){
		$.post("registercompany.do",
				{
			     	companyname:$('#companyname').val(),
			     	description:$('#description').val(),
				},function(data){
					alert(data);
					if(data){
						window.location.href="home.jsp";
					}else{
						window.location.href="loginsuccess.jsp";
					}
				},"json" 
		); 
	});
});
</script>

</head>

<body>
	<div id="indexbox" class="container">
				<div id="indextop" class="row clearfix">
					<div class="col-md-12 column">
						<img src="style/image/ateamlogo.png">
					</div>
				<button style="float:right;" onclick="javascript:location.href='logout.do'" class="btn btn-success" type="button">注销</button>
				</div>
				
				
				<div id="indexmiddle" class="row clearfix">
					<div class="col-md-12 column">
						<div id="chose">
							<h1>登录成功</h1>
							
							
							<button class="btn btn-primary btn-lg btn-success"
								data-toggle="modal" data-target="#buildcompanyModal">创建企业空间</button>
							<!-- 创建企业空间的模态框 -->
							<div class="modal fade" id="buildcompanyModal" tabindex="-1" role="dialog"
								aria-labelledby="buildcompanyLabel" aria-hidden="true">
								<div class="modal-dialog">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal"
												aria-hidden="true">&times;</button>
											<h4 class="modal-title" id="buildcompanyLabel">输入企业空间名称</h4>
										</div>
										<div class="modal-body">
											<div class="form-group">
												<label for="name">公司名称</label>
												<input name="companyname"
					   							id="companyname" type="text" class="form-control"
												placeholder="请输入公司名称">
											</div>
											<div class="form-group">
												<label for="name">公司简介</label>
												<textarea name="description" id="description"
												class="form-control" rows="3"></textarea>
											</div>
										</div>
										<div class="modal-footer">
											<button type="button" class="btn btn-default"
												data-dismiss="modal">关闭</button>
											<button type="button" class="btn btn-primary" id="submitcompany"
											>提交</button>
										</div>
									</div>
									<!-- /.modal-content -->
								</div>
								<!-- /.modal -->
							</div>
							
							
							<button type="button" onclick="javascript:location.href='getallcompanies.do'" class="btn btn-lg btn-primary">加入已创建企业</button>
						
						
						</div>
					</div>
				</div>
				
				
				<div id="indexbottom" class="row clearfix">
					<div class="col-md-12 column"></div>
				</div>
			</div>
</body>
</html>